﻿using HardcoreGame.Common.CustomSets;
using HardcoreGame.Common.Players;
using Microsoft.Xna.Framework;
using Terraria;
using Terraria.Audio;
using Terraria.DataStructures;
using Terraria.ID;
using Terraria.ModLoader;

namespace HardcoreGame.Content.Items.Weapons.Sets.Heavy
{
    public class Reaper : ModItem
    {
        public override void SetDefaults()
        {
            Item.damage = 12;
            Item.DamageType = DamageClass.Melee;
            Item.width = 40;
            Item.height = 40;
            Item.useTime = 50;
            Item.useAnimation = 50;
            Item.useStyle = ItemUseStyleID.Shoot;
            Item.knockBack = 6f;
            Item.value = Item.sellPrice(0, 0, 65, 95);
            Item.rare = ItemRarityID.Blue;
            Item.UseSound = null;
            Item.autoReuse = true;
            Item.useTurn = true;
            Item.noMelee = true;
            Item.noUseGraphic = true;
            Item.shoot = ModContent.ProjectileType<Projectiles.Sets.Heavy.Reaper>();
            Item.shootSpeed = 2f;
            Item.crit = 10;
        }
        public override void SetStaticDefaults()
        {
            CustomItemSets.HeavyWeapon[Type] = true;
        }    
        public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback)
        {           
            SoundEngine.PlaySound(new SoundStyle("HardcoreGame/Assets/Sounds/Items/I_1"), player.position);
            player.GetModPlayer<HeavyWeaponPlayer>().ProcCombo(Item, 45);
            return true;
        }
        
    }
}
